package com.swt.draw.controller;

import com.swt.draw.dao.AdminMapper;
import com.swt.draw.dao.Fla55Mapper;
import com.swt.draw.example.Fla55Example;
import com.swt.draw.vo.AdminDetailVO;
import com.swt.draw.vo.GztToolVO;
import com.swt.draw.vo.page.PageVO;
import com.swt.draw.vo.tableDataResp.TableDataRespVO;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @ClassName
 * @Description TODO
 * @Author Administrator
 * @Date 2019/8/20 0020 0:27
 * @Version 1.0
 **/
@RestController
@RequestMapping("/test")
public class TestController {

    @Resource
    private Fla55Mapper fla55Mapper;

    @Resource
    private AdminMapper adminMapper;

    @RequestMapping("/count")
    public Object test() throws InterruptedException {
        Thread.sleep(10000);
        return 1;
    }

    @RequestMapping("/limitQuery")
    public TableDataRespVO query(){
        TableDataRespVO respVO = new TableDataRespVO();
        PageVO pageVO = new PageVO();
        pageVO.setEnd(10);
        pageVO.setStart(1);
        List<GztToolVO> toolVOS = fla55Mapper.getToolList(null, null, pageVO);
        respVO.setData(toolVOS);
        return respVO;
    }

}
